#ifndef VECTOR_H
#define VECTOR_H

// --- includes
#include <cmath>

// --- consts
const float PI = 3.1415926535897f;
const float RAD_TO_DEG = 180 / PI;
#define EPSILON 0.001f

// --- structs
struct Vector2D
{
	float x, y;
};

struct Vector3D
{
	float x, y, z;
};

// --- proto
// Vector 2D
Vector2D Add(const Vector2D* left, const Vector2D* right);
Vector2D Substract(const Vector2D* left, const Vector2D* right);
Vector2D Scale(const Vector2D* vect, float scale);
void MoveBy(const Vector2D* by, /*ES*/ Vector2D* toMove);
float GetPolarAngleDeg(const Vector2D* vect);
float AngleBetweenDeg(const Vector2D* left, const Vector2D* right);
float Length(const Vector2D* vect);
float LengthSq(const Vector2D* vect);
bool Normalize(Vector2D* vect);
void ScaleBy(Vector2D* vect, float scale);
Vector2D GetVectorByAngleDeg(float angle);
bool Equals(const Vector2D* left, const Vector2D* right);

// Vector 3D
Vector3D Add(const Vector3D* left, const Vector3D* right);
Vector3D Substract(const Vector3D* left, const Vector3D* right);
Vector3D Scale(const Vector3D* vect, float scale);
float Dot(const Vector3D* left, const Vector3D* right);
Vector3D CrossLH(const Vector3D* left, const Vector3D* right);
Vector3D CrossRH(const Vector3D* left, const Vector3D* right);
void MoveBy(const Vector3D* by, /*ES*/ Vector3D* tomove);
float Length(const Vector3D* vect);
float LengthSq(const Vector3D* vect);
bool Normalize(Vector3D* vect);
void ScaleBy(Vector3D* vect, float scale);
bool Equals(const Vector3D* left, const Vector3D* right);

#endif